$(document).ready(function() { 
        
		  init();
		                  
		  $(function() {
		    $("#address").autocomplete({
		      //This bit uses the geocoder to fetch address values
		      source: function(request, response) {
		        geocoder.geocode( {'address': request.term }, function(results, status) {
		          response($.map(results, function(item) {
		            return {
		              label:  item.formatted_address,
		              value: item.formatted_address,
		              latitude: item.geometry.location.lat(),
		              longitude: item.geometry.location.lng()
		            }
		          }));
		        })
		      },
		      //This bit is executed upon selection of an address
		      select: function(event, ui) {
		        $("#latitude").val(ui.item.latitude);
		        $("#longitude").val(ui.item.longitude);
		        var location = new google.maps.LatLng(ui.item.latitude, ui.item.longitude);
		        marker.setPosition(location);
		        map.setCenter(location);
		      }
		    });
		  });